package nuonuo.com.view.activity;

import android.content.Context;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import nuonuo.com.view.R;

public class MainActivity extends AppCompatActivity {
    private Button btnPtr,btnSwipe,btnNet;
    private Context mContext;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        btnPtr = (Button) findViewById(R.id.btn_ptr);
        btnSwipe = (Button) findViewById(R.id.btn_swipe);
        btnNet = (Button) findViewById(R.id.btn_retrofit);

        mContext = this;
        btnPtr.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                startActivity(new Intent(MainActivity.this, PtrActivity.class));
            }
        });

        btnSwipe.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                startActivity(new Intent(mContext,QQSwipeLayout.class));
            }
        });

        btnNet.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                startActivity(new Intent(mContext, RxJavaRetrofit.class));
            }
        });
    }
}
